home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 8250 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.5 KB

  1. Path: dfw.nkn.net!usenet
  2. From: wiersch@fastlane.net (Albert Wiersch)
  3. Newsgroups: comp.lang.c++
  4. Subject: Help with Win95, & BC4.52
  5. Date: Fri, 16 Feb 1996 08:00:09 GMT
  6. Organization: National Knowledge Network
  7. Message-ID: <4g16bb$idt@dfw.nkn.net>
  8. NNTP-Posting-Host: fw47.fastlane.net
  9. X-Newsreader: Forte Free Agent 1.0.82
  10.  
  11. I have a problem and a question.
  12.  
  13. #1. How do I change the focus on a dialog box. I want to be able to
  14. set the focus on a EDITTEXT box so the user does not have to TAB over
  15. to it or use the mouse to make it the focus... I want the function
  16. call I can issue to select this dialog control or any other as being
  17. the focus.
  18.  
  19. #2... This crashes my program...
  20.  
  21.   case WM_INITDIALOG:         // initialize Program Options Dialog Boc
  22.    SetDlgItemText(hdwnd,DB1_FILENAME,p.defaultconffilename);
  23.  
  24.    if (p.checknesting) SendDlgItemMessage(hdwnd,DB1_CHECKNESTING,
  25.     BM_SETCHECK,1,0);         // set checkbox if checked
  26.    if (p.alwaysnotepad) SendDlgItemMessage(hdwnd,DB1_NOTEPAD,
  27.     BM_SETCHECK,1,0);         // set checkbox if checked
  28.    return 1;
  29.  
  30. If I remove the SetDlgItemText command, there is no crash... but I
  31. need this command and I don't understand what is wrong with it.
  32. p.defaultname is an array of 256 chars. If I move it to another case
  33. statement, it seems to work. It says stack fault in kernel32.dll when
  34. I list the details of the crash.
  35.  
  36.  
  37. Please send any help you can offer to me in email. I would really
  38. appreciate it.
  39.  
  40. Regards,
  41. Albert Wiersch
  42. METRO 817-589-9600
  43. wiersch@fastlane.net
  44. http://www.fastlane.net/~wiersch
  45.  
  46.